home *** CD-ROM | disk | FTP | other *** search
- * edit.sig 08/18/83
- STORE CHR(PEEK (063)) TO dr
- STORE # TO rec:number
- * for speed - eliminate the index during edit
- SET INDEX TO
- * why edit a record to be deleted - so bring it back
- RECALL
- STORE order TO morder
- STORE comp TO mcomp
- STORE lname TO mlname
- STORE fname TO mfname
- STORE addr1 TO maddr1
- STORE addr2 TO maddr2
- STORE addr3 TO maddr3
- STORE city TO mcity
- STORE state TO mstate
- STORE zip TO mzip
- STORE vol1 TO mvol1
- STORE amt TO mamt
- STORE entered TO mentered
- STORE shipped TO mshipped
- STORE rem1 TO mrem1
- STORE rem2 TO mrem2
- STORE bo TO mbo
- STORE catalog TO mcatalog
- STORE bo:ship TO mbo:ship
- STORE bo2:ship TO mbo2:ship
- STORE dayu TO mdayu
- ERASE
- STORE 'Edit Order Module' TO mode
- STORE 'Enter the new or corrected information' TO prompt1
- STORE ' ' TO prompt2
- STORE "Control 'Q' to end edit session" TO prompt3
- @ 1,25 SAY mode
- @ 2, 0 SAY "+---------------------------------------"
- @ 2,39 SAY "---------------------------------------+"
- @ 3, 5 SAY "ORDER NUMBER "
- @ 3,43 SAY "Complete "
- @ 4, 8 SAY "Last name "
- @ 4,46 SAY "First "
- @ 5,10 SAY "Address "
- @ 6, 9 SAY "(line 2) "
- @ 7, 9 SAY "(line 3) "
- @ 8,13 SAY "City "
- @ 8,46 SAY "State "
- @ 8,65 SAY "ZIP "
- @ 10, 2 SAY "Volumes "
- @ 12, 3 SAY "Amount "
- @ 12,46 SAY "Enter "
- @ 12,64 SAY "Ship "
- @ 13, 2 SAY "Remarks "
- @ 14, 2 SAY "Remarks "
- @ 16, 0 SAY "Backorder "
- @ 17,44 SAY "Catalog "
- @ 18, 2 SAY "Shipped "
- @ 18,26 SAY "Shipped "
- @ 18,62 SAY "Update "
- @ 19, 0 SAY "+---------------------------------------"
- @ 19,39 SAY "---------------------------------------+"
- @ 20,12 SAY prompt1
- @ 21,12 SAY prompt2
- @ 22,12 SAY prompt3
- @ 3,19 GET morder picture '999999999'
- @ 4,19 GET mlname
- @ 4,53 GET mfname
- @ 5,19 GET maddr1
- @ 6,19 GET maddr2
- @ 7,19 GET maddr3
- @ 8,19 GET mcity
- @ 8,53 GET mstate picture '!!'
- @ 8,70 GET mzip picture '99999'
- @ 10,11 GET mvol1
- @ 12,11 GET mamt
- @ 12,53 GET mentered picture '99/99/99'
- @ 12,70 GET mshipped picture '99/99/99'
- @ 13,11 GET mrem1
- @ 14,11 GET mrem2
- @ 16,11 GET mbo
- @ 17,53 GET mcatalog picture '!'
- @ 18,11 GET mbo:ship picture '99/99/99'
- @ 18,35 GET mbo2:ship picture '99/99/99'
- @ 18,70 GET mdayu picture '99/99/99'
- @ 3,53 GET mcomp picture '!'
- READ
- CLEAR GETS
- * put your editing routines here
- DO CASE
- CASE .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
- STORE t TO error
- CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
- STORE t TO error
- OTHERWISE
- STORE f TO error
- ENDCASE
- IF error
- @ 01,00
- @ 20,00
- @ 21,00
- @ 22,00
- @ 1,18 SAY 'Please Correct the Indicated Data'
- STORE t to an:error
- DO WHILE an:error
- DO CASE
- CASE .NOT. (mcomp = 'Y' .OR. mcomp = 'N')
- @ 21,15 SAY 'Must answer "Y" or "N" if shipping completed '
- @ 3,53 GET mcomp picture '!'
- READ
- CASE .NOT. (mcatalog = 'Y' .OR. mcatalog = 'N' .OR. mcatalog = 'B')
- @ 22,15 SAY 'Enter either "Y", "N" or "B" (backorder)'
- @ 17,53 GET mcatalog picture '!'
- READ
- OTHERWISE
- STORE f TO an:error
- ENDCASE
- ENDDO while an:error
- ENDIF error
- STORE 'N' TO command
- @ 20,00
- @ 21,00
- @ 22,00
- @ 21,15 SAY 'Are there any more changes ? '
- @ 21,48 GET command picture '!'
- READ
- IF command = 'Y'
- @ 3,19 GET morder picture '9999'
- @ 4,19 GET mlname
- @ 4,53 GET mfname
- @ 5,19 GET maddr1
- @ 6,19 GET maddr2
- @ 7,19 GET maddr3
- @ 8,19 GET mcity
- @ 8,53 GET mstate picture '!!'
- @ 8,70 GET mzip picture '99999'
- @ 10,11 GET mvol1
- @ 12,11 GET mamt
- @ 12,53 GET mentered picture '99/99/99'
- @ 12,70 GET mshipped picture '99/99/99'
- @ 13,11 GET mrem1
- @ 14,11 GET mrem2
- @ 16,11 GET mbo
- @ 17,53 GET mcatalog picture '!'
- @ 18,11 GET mbo:ship picture '99/99/99'
- @ 18,35 GET mbo2:ship picture '99/99/99'
- @ 18,70 GET mdayu picture '99/99/99'
- @ 3,53 GET mcomp picture '!'
- READ
- CLEAR GETS
- ENDIF command = 'Y'
- REPLACE order WITH morder, comp WITH mcomp
- REPLACE lname WITH mlname, fname WITH mfname
- REPLACE addr1 WITH maddr1, addr2 WITH maddr2, addr3 WITH maddr3
- REPLACE city WITH mcity, state WITH mstate, zip WITH mzip
- REPLACE vol1 WITH mvol1
- REPLACE amt WITH mamt
- REPLACE entered WITH mentered
- REPLACE shipped WITH mshipped, rem1 WITH mrem1, rem2 WITH mrem2
- REPLACE bo WITH mbo, catalog WITH mcatalog, bo:ship WITH mbo:ship
- REPLACE bo2:ship WITH mbo2:ship
- STORE 'Y' TO command
- @ 20,00
- @ 21,00
- @ 22,00
- @ 21,12 SAY 'Do You want to UpDate to Todays Date (Y/N) ?'
- @ 21,57 GET command PICTURE '!'
- READ
- IF command = 'Y'
- REPLACE dayu WITH DATE()
- ELSE
- REPLACE dayu WITH mdayu
- ENDIF
- @ 23,0 SAY 'Hit RETURN to Continue'
- SET CONSOLE OFF
- SET INDEX TO &dr.:orders
- SET CONSOLE ON
- RELEASE ALL
- STORE '?' TO command
- STORE t TO more
- STORE t TO first